glx: Trap errors inside loop
authorBenjamin Otte <otte@redhat.com>
Sat, 3 Jun 2023 16:00:56 +0000 (18:00 +0200)
committerBenjamin Otte <otte@redhat.com>
Sat, 3 Jun 2023 16:03:56 +0000 (18:03 +0200)
commit0016fea36bf4b7e95726c064f1248385a75c6517
treed9386209c5d977b6a43a11fb22ccc5b4a0cfa4d1
parent21c53a1969df59af7ac9d3f5b4b83ef73db8265f
glx: Trap errors inside loop

Instead of trapping errors for the whole loop trying to create GL
contexts, trap them once per GL context.

Apparently GLX does throw an error when a too high version is requested
and doesn't just return NULL and then that error lingers when we try
lower versions.

Fixes #5857
gdk/x11/gdkglcontext-glx.c